package cn.kuporo.seckill.dubbo.interfaces.stock;

import cn.kuporo.seckill.common.cache.model.SeckillBusinessCache;
import cn.kuporo.seckill.common.model.dto.SeckillStockDTO;

/**
 * @author: kuporo
 * @since: 2025/8/2
 * @description: 库存和商品都要实现的Dubbo接口
 */
public interface SeckillStockDubboService {
    /**
     * 获取商品的可用库存
     */
    SeckillBusinessCache<Integer> getAvailableStock(Long goodsId, Long version);

    /**
     * 获取商品的库存信息
     */
    SeckillBusinessCache<SeckillStockDTO> getSeckillStock(Long goodsId, Long version);
}
